﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Dataweb.NShape;
using cz.zcu.PreSti.Guide;

namespace cz.zcu.PreSti.Application
{
    /// <summary>
    /// Provides form with menu for stimuli guides.
    /// </summary>
    public partial class GuideMenuWindow : Form
    {
        private Project project;
        private Diagram diagram;
        private MainWindow mainWindow;

        /// <summary>
        /// Initializes a new instance of the <see cref="GuideMenuWindow"/> class.
        /// </summary>
        /// <param name="project">The project.</param>
        /// <param name="diagram">The diagram.</param>
        /// <param name="mainWindow">The main window.</param>
        public GuideMenuWindow(Project project, Diagram diagram, MainWindow mainWindow)
        {
            InitializeComponent();
            this.project = project;
            this.diagram = diagram;
            this.mainWindow = mainWindow;            
        }

        public GuideWindow GuideWindow
        {
            get
            {
                throw new System.NotImplementedException();
            }
            set
            {
            }
        }

        /// <summary>
        /// Handles the Click event of the LBRandomExperiment control: creates and shows the window of random guide.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void LBRandomExperiment_Click(object sender, EventArgs e)
        {
            this.Close();
            GuideWindow randomGuideWindow = new GuideWindow(project, diagram, "random", mainWindow);
            randomGuideWindow.Show();
        }

        /// <summary>
        /// Handles the Click event of the LBSequentialExperiment control: creates and shows the window of sequential guide.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void LBSequentialExperiment_Click(object sender, EventArgs e)
        {
            this.Close();
            GuideWindow sequentialGuideWindow = new GuideWindow(project, diagram, "sequential", mainWindow);
            sequentialGuideWindow.Show();
        }

        /// <summary>
        /// Handles the MouseMove event of the LBRandomExperiment control: underscores the label of the random guide.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
        private void LBRandomExperiment_MouseMove(object sender, MouseEventArgs e)
        {
            LBRandomExperiment.ForeColor = Color.Red;
        }

        /// <summary>
        /// Handles the MouseMove event of the LBSequentialExperiment control: underscores the label of sequential guide.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
        private void LBSequentialExperiment_MouseMove(object sender, MouseEventArgs e)
        {
            LBSequentialExperiment.ForeColor = Color.Red;
        }

        /// <summary>
        /// Handles the MouseLeave event of the LBRandomExperiment control: erases the label highlight of the random guide.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
        private void LBRandomExperiment_MouseLeave(object sender, EventArgs e)
        {
            LBRandomExperiment.ForeColor = Color.Black;
        }

        /// <summary>
        /// Handles the MouseLeave event of the LBSequentialExperiment control: erases the label highlight of the sequential guide.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void LBSequentialExperiment_MouseLeave(object sender, EventArgs e)
        {
            LBSequentialExperiment.ForeColor = Color.Black;
        }
    }
}
